<!--
	作者：956911785@qq.com
	时间：2019年8月1日17:53:45
	描述：书籍分类-修改
-->

<template>
	<Tcontent ref="Tcontent" :teas="editparam" :title="title" @addsave="editsave"></Tcontent>
</template>

<script>
	import Tcontent from "./Tcontent";
	export default {
		name:"editSjfl",
		props: {
    		editparam:{
    			type:Object,	
    			default: function() {
					return null
				}
    		}
    	
    	},
		data() {
			return {
				title:'修改书籍'
			}
		},
		components: {
			Tcontent
		},
		methods: {
			editsave:function(datas){	
				const da={...datas};
				const params={
					bid:da.bid, //主键id
					classid:da.classid,//分类id
					bookname:da.bookname, //书名
					totalpage:da.totalpage, //总页数
					minnum:da.minnum, //每天最低读书量
					fm:da.fm, //封面
					nj:da.nj, //推荐阅读年级
					bj:da.bj, //推荐阅读班级
					author:da.author, //作者
					reason:da.reason, //推荐理由
					bookjj:da.bookjj, //简介
					authorjj:da.authorjj, //作者简介
					bookxx:da.bookxx, //书籍基本信息
					words:da.words,
					sh:da.sh,
				};
                this.$http.post("/host/readbook/sjgl/EditBook.html",params)
				.then(result => {
					if(result){
						this.$Modal.success({
                            title: "提示",
                            content: "修改成功！"
                       });
                       this.$emit("reload");
                       this.$refs.Tcontent.modal0=false;
					}else{
						this.$Modal.error({
                            title: "提示",
                            content: "修改失败，请联系管理员！"
                        });	
					}
				});
	        },
			openmodal(){
				this.$refs.Tcontent.modal0 = true;
			}
		},
		mounted() {

		},
		watch:{
			
		},
		computed: {
			
		}
		
	}
</script>

<style scoped="scoped">
	
</style>



